package com.easyssh.framework.web.action;

/**
 * 
 * @ClassName: EasyAction
 * @Description: TODO(基础action)
 * @author liangyuanbing
 * @date 2015年12月18日 下午5:56:42
 *
 */
public class EasyAction extends GenericAction {
	private static final long serialVersionUID = 1L;
	public static final String LOGIN = "login";
	public static final String INDEX = "index";
	public static final String BUILD = "build";
	public static final String INSERT = "insert";
	public static final String EDIT = "edit";
	public static final String UPDATE = "update";
	public static final String DELETE = "delete";
	public static final String SEARCH = "search";
	public static final String DETAIL = "detail";
	public static final String REDIRECT_INDEX = "redirect_index";
	public static final String JSONPG = "jsonpg";
	public static final String ERRORPG = "errorpg";
	public static final String TIME_OUT = "time_out";
	/**
	 * 非法访问IP
	 */
	protected static final String ILLICIT = "illicit";
	/**
	 * 验证码
	 */
	protected static final String AUTH_CODE = "authCode";

	/**
	 * 提示信息
	 */
	private String tipmsg;

	/**
	 * 成败标识
	 */
	private boolean sign;

	public String getTipmsg() {
		return tipmsg;
	}

	public void setTipmsg(String tipmsg) {
		this.tipmsg = tipmsg;
	}

	public boolean isSign() {
		return sign;
	}

	public void setSign(boolean sign) {
		this.sign = sign;
	}

	/**
	 * 设置操作成功提示信息
	 * @param tipmsg
	 */
	public void setSuccessMsg(String tipmsg) {
		this.tipmsg = toUtf8Encode(toUtf8Encode(tipmsg));
		sign = true;
	}

	/**
	 * 设置操作失败提示信息
	 * @param tipmsg
	 */
	public void setFailureMsg(String tipmsg) {
		this.tipmsg = toUtf8Encode(toUtf8Encode(tipmsg));
		sign = false;
	}
}
